package jp.ac.u_tokyo.dch.action;

import jp.ac.u_tokyo.dch.util.common.ModoruUtil;

import org.apache.struts2.ServletActionContext;

import com.opensymphony.xwork2.ActionSupport;
/**
* @version 1.1
*/
public class CommonAction extends ActionSupport {

	/**
	 *シリアル番号
	 */
	private static final long serialVersionUID = 1L;

	/**
	 * 戻るURL
	 */
	private String modoruUrl;


	/**
	 * Tokenエラー
	 * @return
	 * @throws Exception
	 */
	public String invalidToken() throws Exception {

		return SUCCESS;
	}
	/**
	 * 戻る処理を行う
	 * @return 結果
	 * @throws Exception 例外
	 */
	public String execute() throws Exception {

		ModoruUtil.modoruProcess(ServletActionContext.getRequest(), "/output/main","");
        return SUCCESS;
    }
	/**
	 * 戻る処理を行う
	 * @return 結果
	 * @throws Exception
	 */
	public String modoru() throws Exception {

		modoruUrl = ModoruUtil.modoruUrl(ServletActionContext.getRequest());
		return SUCCESS;
	}

	/**
	 *
	 * @return 戻るURL
	 */
	public String getModoruUrl() {
		return modoruUrl;
	}

}
